import request from '@/utils/request'

// 查询单词详情列表
export function listVocabulary(query) {
  return request({
    url: '/word-memory/vocabulary-info/list',
    method: 'get',
    params: query
  })
}
// 查询单词详情列表
export function getAudio(query) {
  return request({
    url: '/word-memory/vocabulary-info/audio',
    method: 'get',
    params: query
  })
}


// 查询单词详情详细
export function getVocabulary(id) {
  return request({
    url: '/word-memory/vocabulary-info/' + id,
    method: 'get'
  })
}

// 新增单词详情
export function addVocabulary(data) {
  return request({
    url: '/word-memory/vocabulary-info',
    method: 'post',
    data: data
  })
}

export function genAudio(ids) {
  return request({
    url: '/word-memory/vocabulary-info/audio',
    method: 'put',
    data: ids
  })
}

// 修改单词详情
export function updateVocabulary(data) {
  return request({
    url: '/word-memory/vocabulary-info',
    method: 'put',
    data: data
  })
}

// 删除单词详情
export function delVocabulary(id) {
  return request({
    url: '/word-memory/vocabulary-info/' + id,
    method: 'delete'
  })
}
